<?php  
  
$dbh = new PDO("mysql:host=mysql:3306;dbname=joomla","root","root");  
$query = "select 1 from dual";  
$result = $dbh->query($query);  
$rows = $result->fetchAll();  
foreach($rows as $row)  
{  
 var_dump($row);
}  
  
$dbh = null;  
  
?>  